const state = {
    fileDownProgress:{
      progress:0,
      fileUrl:'',
      type:'',//line 下载中 over 下载完成
    },
    fileDownList:[],
    fileDownSuccess:false
  }
  
  const mutations = {
    SET_FILE_DOWN_PROGRESS: (state, progress) => {
      state.fileDownProgress=progress;
    },
    SET_FILE_DOWN_LIST: (state, list) => {
      state.fileDownList=Array.isArray(list)?list:[];
    },
    SET_FILE_DOWN_SUCCESS: (state, status) => {
      state.fileDownSuccess=status;
    },
  }
  
  const actions = {
    setfileDownProgress({ commit }, progress) {
      commit('SET_FILE_DOWN_PROGRESS', progress)
    },
    setfileDownList({ commit }, list) {
      commit('SET_FILE_DOWN_LIST', list)
    },
    setfileDownSuccess({ commit }, status) {
      commit('SET_FILE_DOWN_SUCCESS', status)
    },
  }
  
  export default {
    namespaced: true,
    state,
    mutations,
    actions
  }
  